home *** CD-ROM | disk | FTP | other *** search
/ GameStar 2006 February / Gamestar_81_2006-02_dvd.iso / Red Shark / Common / LargeCountryHouse.script < prev    next >
Encoding:
Text File  |  2001-10-08  |  2.0 KB  |  78 lines

  1. //-------------------------------------------------------------------
  2. //
  3. //  This code is copyright 2001 by G5 Software.
  4. //  Any unauthorized usage, either in part or in whole of this code
  5. //  is strictly prohibited. Violators WILL be prosecuted to the
  6. //  maximum extent allowed by law.
  7. //
  8. //-------------------------------------------------------------------
  9.  
  10. class CLargeCountryHouseMesh_1
  11. {
  12.   string MeshFile = "Models/B_Country_6.mesh";
  13.   string SkinFile = "Models/B_Country_6.skin";
  14. }
  15.  
  16. class CLargeCountryHouseMesh_2
  17. {
  18.   string MeshFile = "Models/B_Country_7.mesh";
  19.   string SkinFile = "Models/B_Country_7.skin";
  20. }
  21.  
  22. class CLargeCountryHouseMesh_3
  23. {
  24.   string MeshFile = "Models/B_Country_8.mesh";
  25.   string SkinFile = "Models/B_Country_8.skin";
  26. }
  27.  
  28. class CLargeCountryHouseMesh_4
  29. {
  30.   string MeshFile = "Models/B_Country_9.mesh";
  31.   string SkinFile = "Models/B_Country_9.skin";
  32. }
  33.  
  34. class CLargeCountryHouseMesh_5
  35. {
  36.   string MeshFile = "Models/B_House_d.mesh";
  37.   string SkinFile = "Models/B_House_d.skin";
  38. }
  39.  
  40. class CLargeCountryHouseStateControl extends CUnitLifeControl
  41. {
  42.   void CLargeCountryHouseStateControl()
  43.   {
  44.     CUnitLifeControl(2500.0);
  45.     m_DestroyPause = 20.0;
  46.     m_ExplosionId  = "EXPLID_BuildingExplosion";
  47.   }
  48. }
  49.  
  50. // Building without ground control (for use in villages)
  51. class CBaseLargeCountryHouse extends CBuilding, CUnitWithStateControl
  52. {
  53.   array m_MeshClassNames = array(
  54.       "CLargeCountryHouseMesh_1",
  55.       "CLargeCountryHouseMesh_2",
  56.       "CLargeCountryHouseMesh_3",
  57.       "CLargeCountryHouseMesh_4",
  58.       "CLargeCountryHouseMesh_5"
  59.     );
  60.  
  61.   void CBaseLargeCountryHouse()
  62.   {
  63.     int MeshNumber = rand_int(m_MeshClassNames.size());
  64.     InitializeModelAsStatic(m_MeshClassNames[MeshNumber]);
  65.     CUnitWithStateControl("CLargeCountryHouseStateControl");
  66.   }
  67. }
  68.  
  69. // Single game object
  70. class CMountedLargeCountryHouse extends CBaseLargeCountryHouse
  71. {
  72.   void CMountedLargeCountryHouse()
  73.   {
  74.     InitializeGroundControl();
  75.   }
  76. }
  77.  
  78.